package kr.hkit.powerjava.coffee.dto;

public class Product {
	private String code;// 제품코드
	private int price;// 제품단가
	private int amount;// 판매수량
	private int supply;// 공급가액 = 판매금액 - 부가세액
	private int surtax;// 부가세액 = 판매금액 / 11 (소수점 첫자리에서 반올림)
	private int sellingPrice;// 판매금액 = 제품단가 * 판매수량
	private int margin;// 마진율
	private int marginSum;// 마진액 = 공급가액 * 마진율 (소수점 첫자리에서 반올림)

	public Product() {
		super();
	}

	public Product(String code, int price, int amount, int margin) {
		super();
		this.code = code;
		this.price = price;
		this.amount = amount;
		this.margin = margin;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public int getSupply() {
		return supply;
	}

	public void setSupply(int supply) {
		this.supply = supply;
	}

	public int getSurtax() {
		return surtax;
	}

	public void setSurtax(int surtax) {
		this.surtax = surtax;
	}

	public int getSellingPrice() {
		return sellingPrice;
	}

	public void setSellingPrice(int sellingPrice) {
		this.sellingPrice = sellingPrice;
	}

	public int getMargin() {
		return margin;
	}

	public void setMargin(int margin) {
		this.margin = margin;
	}

	public int getMarginSum() {
		return marginSum;
	}

	public void setMarginSum(int marginSum) {
		this.marginSum = marginSum;
	}

	@Override
	public String toString() {
		return String.format("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", code, price,
				amount, supply, surtax, sellingPrice, margin, marginSum);
	}

}
